<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../day11/js/jquery-3.7.1.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<button>1</button>
		<button>2</button>
		<button>3</button>
		<button>4</button>
		<button>5</button>
		<button>6</button>
		<button>7</button>
		<button>8</button>
		<button>9</button>
		<button>10</button>
		<script type="text/javascript">
			/*var btns = document.querySelectorAll("button")
			for (let i = 0; i < btns.length; i++) {
				btns[i].addEventListener("click", fun)
				btns[i].addEventListener("mouseenter", fun)
				btns[i].addEventListener("mouseout", fun)

			}
			*/
			$("button").click(fun).mouseenter(fun).mouseout(fun)
			
			function fun(){
				console.log(`你${event.type}了按钮${event.target.innerHTML}`);
			}
		</script>
	</body>
</html>
